import { request } from '@/utils/request';
/**
 * @description 获取任务管理列表
 * @param {API.GetListRequest} data
 * @returns
 */

export function getList(data: API.SearchParams) {
  return request({
    url: '/manage/admin/task/xfjdjc/approveList',
    method: 'post',
    data,
  });
}

export function processTasks(data: API.CreateTaskParams) {
  return request(
    {
      url: `/manage/admin/task/xfjdjc/approveTask`,
      method: 'post',
      data,
    },
    {
      isGetDataDirectly: false,
    },
  );
}

export function getApproveRecord(taskId) {
  return request({
    url: `/manage/admin/task/xfjdjc/approveRecord/${taskId}`,
    method: 'get',
  });
}
